package com.lmk.controller;

import com.lmk.domain.User;

import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
@RefreshScope // 远程配置文件发生改变后，本地文件会自动扫描动态刷新
public class UserController {



    @GetMapping("/getUserById/{id}")
    public User getUserById(@PathVariable("id") Long id){
        return new User(id,"张三丰","武林高手" + "端口号：");
    }
}
